﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdentityExample.Data.Models
{
    public class UserMovie : AuditObject
    {
        [Key]
        public int UserMovieId { get; set; }

        [Required]
        public string UserId { get; set; }
        [ForeignKey("UserId"), InverseProperty("UserMovies")]
        public virtual ApplicationUser User { get; set; }

        public int MovieId { get; set; }
        [ForeignKey("MovieId")]
        public virtual Movie Movie { get; set; }

        public int RatingId { get; set; }
        [ForeignKey("RatingId")]
        public virtual Rating Rating { get; set; }
    }
}
